#ifndef MACHINE_H
#define MACHINE_H

#include <iostream>
#include <fstream>

using namespace std;

class Machine {
	public:
		Machine();
		~Machine();
		void CPUReset(char *filename);
		void resetReg();
		short int getNextOpCode();
		void decodeOpCode();
		
		void stack_push(short int);
		short int stack_pop();
		
		// OpCode Helper declarations
		void OpCode_0NNN(short int);
		void OpCode_00E0(short int);
		void OpCode_00EE(short int);
		void OpCode_1NNN(short int);
		void OpCode_2NNN(short int);
		void OpCode_3XNN(short int);
		void OpCode_4XNN(short int);
		void OpCode_5XY0(short int);
		void OpCode_6XNN(short int);
		void OpCode_7XNN(short int);
		void OpCode_8XY0(short int);
		void OpCode_8XY1(short int);
		void OpCode_8XY2(short int);
		void OpCode_8XY3(short int);
		void OpCode_8XY4(short int);
		void OpCode_8XY5(short int);
		void OpCode_8XY6(short int);
		void OpCode_8XY7(short int);
		void OpCode_8XYE(short int);
		void OpCode_9XY0(short int);
		void OpCode_ANNN(short int);
		void OpCode_BNNN(short int);
		void OpCode_CXNN(short int);
		void OpCode_DYXN(short int);
		void OpCode_EX9E(short int);
		void OpCode_EXA1(short int);
		void OpCode_FX07(short int);
		void OpCode_FX0A(short int);
		void OpCode_FX15(short int);
		void OpCode_FX18(short int);
		void OpCode_FX1E(short int);
		void OpCode_FX29(short int);
		void OpCode_FX33(short int);
		void OpCode_FX55(short int);
		void OpCode_FX65(short int);
		
		char memory[0xFFF];
		char reg[16];
		short int address;
		short int pc;
		short int stack[128];
		char display[64][32];

};



#endif